package com.dt.app.api.shopping.service.impl;

import com.dt.app.modules.shopping.entities.DsProduct;
import com.dt.app.modules.shopping.vo.DsProductBean;
import com.dt.app.api.shopping.mapper.DsProductMapper;
import com.dt.app.api.shopping.service.IDsProductService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 鸿源塔基
 * @since 2023-02-27
 */
@Service
public class DsProductServiceImpl extends ServiceImpl<DsProductMapper, DsProduct> implements IDsProductService {
    public DsProduct getEntity(DsProductBean bean){
        DsProduct entity = new DsProduct();
        entity.setProductId(bean.getProductId());
        entity.setManufacturerId(bean.getManufacturerId());
        entity.setAppUserId(bean.getAppUserId());
        entity.setSellersId(bean.getSellersId());
        entity.setCategoryId(bean.getCategoryId());
        entity.setCountryId(bean.getCountryId());
        entity.setSysCompanyId(bean.getSysCompanyId());
        entity.setSellerHeadquartersId(bean.getSellerHeadquartersId());
        entity.setCyProductClassifyId(bean.getCyProductClassifyId());
        entity.setCyProductTypeId(bean.getCyProductTypeId());
        entity.setCyProductTypeSldw(bean.getCyProductTypeSldw());
        entity.setCyProductionId(bean.getCyProductionId());
        entity.setProType(bean.getProType());
        entity.setProductCode(bean.getProductCode());
        entity.setProductName(bean.getProductName());
        entity.setCustomerRating(bean.getCustomerRating());
        entity.setCustomerRatingGood(bean.getCustomerRatingGood());
        entity.setCustomerRatingGcount(bean.getCustomerRatingGcount());
        entity.setListPrice(bean.getListPrice());
        entity.setPrice(bean.getPrice());
        entity.setCostPrice(bean.getCostPrice());
        entity.setLogisVolume(bean.getLogisVolume());
        entity.setLogisWeight(bean.getLogisWeight());
        entity.setLogisModelId(bean.getLogisModelId());
        entity.setShortDesc(bean.getShortDesc());
        entity.setFullDesc(bean.getFullDesc());
        entity.setSearchKey(bean.getSearchKey());
        entity.setProviderId(bean.getProviderId());
        entity.setBarCode(bean.getBarCode());
        entity.setSellersCode(bean.getSellersCode());
        entity.setTemplatePath(bean.getTemplatePath());
        entity.setBuyCount(bean.getBuyCount());
        entity.setStockQty(bean.getStockQty());
        entity.setCategoryPath(bean.getCategoryPath());
        entity.setRegionPath(bean.getRegionPath());
        entity.setFromPath(bean.getFromPath());
        entity.setCreateTime(bean.getCreateTime());
        entity.setPublishTime(bean.getPublishTime());
        entity.setPlanEndTime(bean.getPlanEndTime());
        entity.setPlanStartTime(bean.getPlanStartTime());
        entity.setFromType(bean.getFromType());
        entity.setInvoice(bean.getInvoice());
        entity.setGuarantee(bean.getGuarantee());
        entity.setStatus(bean.getStatus());
        entity.setMembershipsLevel(bean.getMembershipsLevel());
        entity.setIsPush(bean.getIsPush());
        entity.setLongitude(bean.getLongitude());
        entity.setLatitude(bean.getLatitude());
        entity.setSeq(bean.getSeq());
        entity.setBuySeq(bean.getBuySeq());
        entity.setDefImg(bean.getDefImg());
        entity.setCollectionCount(bean.getCollectionCount());
        entity.setSaleStatus(bean.getSaleStatus());
        entity.setLinkman(bean.getLinkman());
        entity.setLinktel(bean.getLinktel());
        entity.setLinkaddress(bean.getLinkaddress());
        entity.setLookCount(bean.getLookCount());
        entity.setDeleted(bean.getDeleted());
        entity.setVersion(bean.getVersion());
        return entity;
    }
    public DsProductBean getBean(DsProduct entity){
        DsProductBean bean = new DsProductBean();
        bean.setProductId(entity.getProductId());
        bean.setManufacturerId(entity.getManufacturerId());
        bean.setAppUserId(entity.getAppUserId());
        bean.setSellersId(entity.getSellersId());
        bean.setCategoryId(entity.getCategoryId());
        bean.setCountryId(entity.getCountryId());
        bean.setSysCompanyId(entity.getSysCompanyId());
        bean.setSellerHeadquartersId(entity.getSellerHeadquartersId());
        bean.setCyProductClassifyId(entity.getCyProductClassifyId());
        bean.setCyProductTypeId(entity.getCyProductTypeId());
        bean.setCyProductTypeSldw(entity.getCyProductTypeSldw());
        bean.setCyProductionId(entity.getCyProductionId());
        bean.setProType(entity.getProType());
        bean.setProductCode(entity.getProductCode());
        bean.setProductName(entity.getProductName());
        bean.setCustomerRating(entity.getCustomerRating());
        bean.setCustomerRatingGood(entity.getCustomerRatingGood());
        bean.setCustomerRatingGcount(entity.getCustomerRatingGcount());
        bean.setListPrice(entity.getListPrice());
        bean.setPrice(entity.getPrice());
        bean.setCostPrice(entity.getCostPrice());
        bean.setLogisVolume(entity.getLogisVolume());
        bean.setLogisWeight(entity.getLogisWeight());
        bean.setLogisModelId(entity.getLogisModelId());
        bean.setShortDesc(entity.getShortDesc());
        bean.setFullDesc(entity.getFullDesc());
        bean.setSearchKey(entity.getSearchKey());
        bean.setProviderId(entity.getProviderId());
        bean.setBarCode(entity.getBarCode());
        bean.setSellersCode(entity.getSellersCode());
        bean.setTemplatePath(entity.getTemplatePath());
        bean.setBuyCount(entity.getBuyCount());
        bean.setStockQty(entity.getStockQty());
        bean.setCategoryPath(entity.getCategoryPath());
        bean.setRegionPath(entity.getRegionPath());
        bean.setFromPath(entity.getFromPath());
        bean.setCreateTime(entity.getCreateTime());
        bean.setPublishTime(entity.getPublishTime());
        bean.setPlanEndTime(entity.getPlanEndTime());
        bean.setPlanStartTime(entity.getPlanStartTime());
        bean.setFromType(entity.getFromType());
        bean.setInvoice(entity.getInvoice());
        bean.setGuarantee(entity.getGuarantee());
        bean.setStatus(entity.getStatus());
        bean.setMembershipsLevel(entity.getMembershipsLevel());
        bean.setIsPush(entity.getIsPush());
        bean.setLongitude(entity.getLongitude());
        bean.setLatitude(entity.getLatitude());
        bean.setSeq(entity.getSeq());
        bean.setBuySeq(entity.getBuySeq());
        bean.setDefImg(entity.getDefImg());
        bean.setCollectionCount(entity.getCollectionCount());
        bean.setSaleStatus(entity.getSaleStatus());
        bean.setLinkman(entity.getLinkman());
        bean.setLinktel(entity.getLinktel());
        bean.setLinkaddress(entity.getLinkaddress());
        bean.setLookCount(entity.getLookCount());
        bean.setDeleted(entity.getDeleted());
        bean.setVersion(entity.getVersion());
        return bean;
    }
}
